#!/bin/bash

echo '[Unit]
Description=IPMI Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=root
Group=root
Type=simple
ExecStart=/opt/software/ipmi_exporter/ipmi_exporter --config.file=/opt/software/ipmi_exporter/ipmi_local.yml
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target' > /etc/systemd/system/ipmi_exporter.service


systemctl daemon-reload
systemctl start ipmi_exporter
systemctl enable ipmi_exporter
